<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'index.jsp' starting page</title>
  </head>
  <body>
    This is my JSP page. <br>
    <p><a href="<s:url action='hello'>
    				<s:param name="type">typeValue</s:param>
    				<s:param name="message.message">message中文</s:param>
    			</s:url>">
    		Struts2 标签 url
    	</a>
    </p>
    
    <p><a href="<s:url action='hello' var="helloLink">
    				<s:param name="type">typeValue</s:param>
    				<s:param name="message.message">message中文</s:param>
    			</s:url>">
    		Struts2 标签 url 使用var
    	</a>
    </p>
    <p><a href="${helloLink}">通过使用var属性连接1</a></p>
    <p><a href="${helloLink}">通过使用var属性连接1</a></p>
    
    <!-- struts2 表单标签 -->
    <s:form action="hello">
  		<s:textfield name="userName" label="Your name" />
   		<s:submit value="Submit" />
	</s:form>
  </body>
</html>
